<link rel="stylesheet" href="/upload/kindeditor/themes/default/default.css" />
	<link rel="stylesheet" href="/upload/kindeditor/plugins/code/prettify.css" />
	<script charset="utf-8" src="/upload/kindeditor/kindeditor.js"></script>
	<script charset="utf-8" src="/upload/kindeditor/lang/zh_CN.js"></script>
	<script charset="utf-8" src="/upload/kindeditor/plugins/code/prettify.js"></script>
        <script type="text/javascript" src="<?php echo $this->module->assetsUrl; ?>/datepicker/WdatePicker.js" /></script>
<link href="<?php echo  $this->module->assetsUrl; ?>/css/profile.css" rel="stylesheet" type="text/css" />


<style type="text/css">
    
div.form label.labelForRadio 
{
    display:inline-block;
    width:auto;float:none;
}
</style>
 

        
        
<script >
            
    
            KindEditor.ready(function(K) {
            editor = K.create('#ActivityLinkSignup_content', {
            resizeType : 1,
            items : [
           'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste', 'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript', 'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/', 'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage', 'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak', 'anchor', 'link', 'unlink', '|', 'about']
            });

            });
</script>    

<div class="container-fluid">

    <div class="row-fluid">
        <div class="span12">
            <h3 class="page-title">
                活动管理 <small>活动查看</small>
            </h3>
            <ul class="breadcrumb">
                <li>
                    <i class="icon-home"></i>
                    <a href="javascript:;">活动管理</a> 
                    <i class="icon-angle-right"></i>
                </li>
                <li class="active"><a href="javascript:;">活动查看</a></li>

            </ul>
            <!-- END PAGE TITLE & BREADCRUMB-->
        </div>
    </div>

    <div class="row-fluid profile">
        <div class="span12">
<!--BEGIN TABS-->
            <div class="tabbable tabbable-custom tabbable-full-width">
                <div class="tab-content">
                    <div class="portlet box blue">
                        <div class="portlet-title">
                                <div class="caption"><i class="icon-reorder"></i>活动查看</div>
                                 <div class="actions">
                                    <a href="javascript:;" class="btn green" onclick="history.go(-1)" ><i calss="icon-pencil"></i>返回</a>     
                                </div>   
                        </div>
                        <div class="portlet-body form">
                                <!-- BEGIN FORM-->
                                <?php if($Activity->type_id==101):?>
                                    <div class="form-horizontal form-view">         
                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">标题</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $Activity->title; ?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>

                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">活动时间</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $Activity->start_time; ?> 到  <?php echo $Activity->end_time; ?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>

                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">活动背景图</label>
                                                        <div class="controls">
                                                            <span class="text"><img id="file_upload_ws" src="<?php echo $Activity->banner_url;?>" width="375" height="222" /></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>

                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">活动缩略图</label>
                                                        <div class="controls">
                                                            <span class="text"><img id="file_upload_ws_min" src="<?php echo $Activity->min_banner_url;?>" width="100" height="100" />          </span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>
                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">是否签到</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $ActivityLinkSignup->is_need_checkin?'是':'否';?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>
                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">签到时间</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $ActivityLinkSignup->checkin_start_time; ?> 到  <?php echo $ActivityLinkSignup->checkin_end_time; ?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>    

                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">是否抽奖</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $ActivityLinkSignup->is_need_lottery?'是':'否';?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>

                                    

                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">是否报名</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $ActivityLinkSignup->is_need_signup?'是':'否';?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>

                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">报名时间</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $ActivityLinkSignup->signup_start_time; ?> 到  <?php echo $ActivityLinkSignup->signup_end_time; ?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>

                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">联系人</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $ActivityLinkSignup->contacts; ?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>
                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">联系电话</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $ActivityLinkSignup->tel; ?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>
                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">活动地址</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $ActivityLinkSignup->address; ?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>

                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">内容</label>
                                                        <div class="controls">
                                                            <span class="text"><textarea class="m-wrap" style="width:800px; height:400px;" id="ActivityLinkSignup_content"><?php echo $ActivityLinkSignup->content; ?></textarea></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div> 
                                </div>
     
                                <?php else:?>
                                    <div class="form-horizontal form-view">     
                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">标题</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $Activity->title; ?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>
                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">投票结束时间</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $Activity->start_time; ?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>
                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">展示结束时间</label>
                                                        <div class="controls">
                                                            <span class="text"><?php echo $Activity->end_time;?></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>
                                    
                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">活动背景图片</label>
                                                        <div class="controls">
                                                            <span class="text"><img id="file_upload_ws" src="<?php echo $Activity->banner_url;?>" width="375" height="222" /></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>
                                    <div class="row-fluid">
                                        <div class="span6 ">
                                                <div class="control-group">
                                                        <label class="control-label" for="firstName">活动背景缩略图片</label>
                                                        <div class="controls">
                                                            <span class="text"><img id="file_upload_ws" src="<?php echo $Activity->min_banner_url;?>" width="100" height="100" /></span>
                                                        </div>
                                                </div>
                                        </div>
                                    </div>
 

                                    <div class="portlet box yellow">
                                            <div class="portlet-title">
                                                    <div class="caption"><i class="icon-coffee"></i>投票问题</div>

                                            </div>
                                            <div class="portlet-body">
                                                    <table class="table table-bordered table-hover">
                                                        <thead>
                                                                <tr>
                                                                        <th>问题</th>
                                                                        <th>选项</th>
                                                                </tr>
                                                        </thead>
                                                            <tbody id="tbody_vote">
                                                                         <?php        
                                                                               $ActivityQNum = count($ActivityLinkVoteQ);
                                                                               $xuanxiang='';
                                                                                foreach ($ActivityLinkVoteQ as $k=>$v){
                                                                                    $ActivityLinkVoteA = ActivityLinkVoteA::model()->findAllByAttributes(array('vote_q_id' => $v['id'])); 

                                                                                    if($ActivityLinkVoteA){

                                                                                         foreach($ActivityLinkVoteA as $kk=>$vv){

                                                                                               // $xuanxiang .= '<span>{'.$vv['sort'].'.'.$vv['a_content']. '} </span> ';
                                                                                             $xuanxiang .= '<span>{'.$vv['a_content']. '} </span> ';
                                                                                        }
                                                                                    }

                                                                                         echo '<tr><td><span>'.$v['sort'].'.'.$v['q_content'].'</span></td><td>'.$xuanxiang.'</td></tr>';

                                                                                    $xuanxiang='';
                                                                                }


                                                                         ?>
                                                            </tbody>
                                                    </table>

                                            </div>
                                    </div>
                                </div>
                                <?php endif;?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>                 
</div>
            
